package com.zelix.bean;

public class AnalyMethod {
    private String cls;
    private String methodName;
    private String methodDesc;
    private String key;

    /**
     * 通过key创建
     *
     * @param key
     */
    public AnalyMethod(String key) {
        String[] args = key.split(":");
        if (args.length == 4) {
            this.cls = args[0];
            this.methodName = args[1];
            this.methodDesc = args[2];
            this.key = args[3];
        }
    }

    /**
     * @param cls        类名
     * @param methodName 方法名
     * @param methodDesc 方法描述
     * @param key        long的key值
     */
    public AnalyMethod(String cls, String methodName, String methodDesc, String key) {
        this.cls = cls;
        this.methodName = methodName;
        this.methodDesc = methodDesc;
        this.key = key;
    }

    public String getCls() {
        return cls;
    }

    public String getMethodName() {
        return methodName;
    }

    public String getMethodDesc() {
        return methodDesc;
    }

    public String getKey() {
        return key;
    }

    @Override
    public String toString() {
        return "AnalyMethod{" +
                "cls='" + cls + '\'' +
                ", methodName='" + methodName + '\'' +
                ", methodDesc='" + methodDesc + '\'' +
                ", key='" + key + '\'' +
                '}';
    }
}
